import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询专病列表
export function listClassify(query) {
  return request({
    url: "/system/classify/list",
    method: "get",
    params: query,
  });
}
//查询标注设置中的专病  //system/mark/install/mark/disease/list
export function MarklistClassify(query) {
  return request({
    url: "/system/mark/install/mark/disease/list",
    method: "get",
    params: query,
  });
}
// 查询专病详细
export function getClassify(diseaseClassifyId) {
  return request({
    url: "/system/classify/" + parseStrEmpty(diseaseClassifyId),
    method: "get",
  });
}
// 新增专病
export function addClassify(data) {
  return request({
    url: "/system/classify",
    method: "post",
    data: data,
  });
}
// 修改专病
export function updateClassify(data) {
  return request({
    url: "/system/classify",
    method: "put",
    data: data,
  });
}
// 删除专病
export function delClassify(diseaseClassifyId) {
  return request({
    url: "/system/classify/" + diseaseClassifyId,
    method: "delete",
  });
}

// 专病状态修改
export function changeClassifyStatus(diseaseClassifyId, status) {
  const data = {
    diseaseClassifyId,
    status,
  };
  return request({
    url: "/system/classify/changeStatus",
    method: "put",
    data: data,
  });
}
